Inline

annotation class Inline

Java field-friendly version of TomlInline

Forces the annotated array-like or table-like property to be a one-liner.

class Data(
@TomlInline
val inlineProperty: Map<String, String>,
val noInlineProperty: Map<String, String>
)
val data = mapOf("a" to "something", "b" to "another thing")
Data(data, data)

will produce:

inlineProperty = { a = "something", b = "another thing" }

[noInlineProperty]
a = "something"
b = "another thing"

Without @TomlInline, both of these two properties will act like how noInlineProperty behaves.